/**
 * @ author: 汪孟苹
 */
define(["jquery","template","comm/toast/toast.tpl"],function($,template,tpl){
	var toastUi = {};

	var drawToastConfirm = function(data){
		return template("tpl_toast_confirm",data);
	}
	toastUi.confirmInit = function(options){
		$("body").append(tpl.confirm());
		var html = drawToastConfirm(options);
		$("#tpl_toast_confirm").remove();	// 将模板移除掉（模板id）
		$("body").append(html);
	}

	/**
	 * 模态框
	 */
	var drawModal = function(data){
		return template("tpl_toast_modal",data);
	}
	toastUi.modal = function(data){
		$("#" + data.id).html(tpl.modal());
		var h = drawModal(data);
		$("#" + data.id).html(h);
	};

	return toastUi;
});